.\" sa2 manual page - (C) 1999-2020 Sebastien Godard (sysstat <at> orange.fr)
.TH SA2 8 "AUGUST 2023" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
sa2 \- Create a report from the current standard system activity daily data file.

.SH SYNOPSIS
.B /usr/lib/sa/sa2

.SH DESCRIPTION
.RB "The " "sa2 " "command is a shell procedure variant of the " "sar"
command which writes a daily report in the
.IR "sarDD " "or the " "sarYYYYMMDD " "file, where"
.IR "YYYY " "stands for the current year, " "MM " "for the current month and " "DD"
for the current day. By default the report is saved in the
.I /var/log/sa
directory. The
.B sa2
command will also remove reports more than one week old by default.
You can however keep reports for a longer (or a shorter) period by setting the
.B HISTORY
environment variable. Read the
.BR "sysstat" "(5) manual page for details."
.PP
.RB "The " "sa2 " "command accepts most of the flags and parameters of the " "sar " "command."
.PP
.RB "The " "sa2 " "command is designed to be started automatically by the " "cron " "command."

.SH EXAMPLES
.RB "To run the " "sa2"
command daily, place the following entry in your root crontab file:

.B 5 19 * * 1\-5 /usr/lib/sa/sa2 \-A

This will generate by default a daily report called
.IR "sarDD " "in the"
.I /var/log/sa
directory, where the
.IR "DD " "parameter is a number representing the day of the month."

.SH FILES
.I /var/log/sa/sarDD
.br
.I /var/log/sa/sarYYYYMMDD
.RS
The standard system activity daily report files and their default location.
.IR "YYYY " "stands for the current year, " "MM " "for the current month and " "DD " "for the current day."

.SH AUTHOR
Sebastien Godard (sysstat <at> orange.fr)

.SH SEE ALSO
.BR "sar" "(1), " "sadc" "(8), " "sa1" "(8), " "sadf" "(1), " "sysstat" "(5)"
.PP
.I https://github.com/sysstat/sysstat
.br
.I https://sysstat.github.io/
